<body class="m-self-adrs">
<?php foreach($list as $k=>$v) {?>
    <?php if($k == 0) {?>
    <dl class="f-cb J_sltAdrs">
        <dt class="z-on" shop_id="<?=$v['shop_id']?>">&nbsp;</dt>
        <dd>
            <p><em><?= isset($fromInfo['from']) && $fromInfo['from'] == 'refund'? '退货地址' : '自提地址'?></em><span><?=$v['address']?></span></p>
            <h6><span></span><b><?=$v['mobile']?></b></h6>
        </dd>
    </dl>
    <?php } else {?>
        <dl class="f-cb J_sltAdrs">
            <dt shop_id="<?=$v['shop_id']?>">&nbsp;</dt>
            <dd>
                <p><em><?= isset($fromInfo['from']) && $fromInfo['from'] == 'refund'? '退货地址' : '自提地址'?></em><span><?=$v['address']?></span></p>
                <h6><span></span><b><?=$v['mobile']?></b></h6>
            </dd>
        </dl>
    <?php }?>
<?php }?>



<script>
    $(function(){

        var zon = 'z-on';
        $('.J_sltAdrs').on('touchend', 'dl', function(evt){

            var _this = $(this).find('dt');
            if(_this.hasClass(zon)){
            }else{
                $('.J_sltAdrs').find('dt').removeClass(zon);
                _this.addClass(zon);
            }
            evt.preventDefault();

            <?php if (isset($fromInfo['from'])) {?>
                <?php if ($fromInfo['from'] == 'refund') {?>
                    console.log(_this.attr("shop_id"));
                    window.location.href = '<?=\yii\helpers\Url::to(['returngoods/apply_info', 'order_id' => $fromInfo['order_id'], 'product_id' => $fromInfo['product_id'], 'refund_type' => $fromInfo['refund_type']])?>&shop_id=' + _this.attr("shop_id");
                <?php }?>
            <?php }else {?>
                history.go(-1);
            <?php }?>
            return false;
        });
    });
</script>
</body>